<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<input type="file" id="xxfile">
<input type="button" value="上传" id="btn_submit">

<br>
<img id="show_img"/>
<!--<canvas id="canvas" style="display: none;"></canvas>-->
<script src="jquery-1.10.1.min.js"></script>
<script src="xxUploadImg.js"></script>
<script type="text/javascript">
    $(function () {
        $("#btn_submit").click(function () {
            $("#xxfile").xxUploadImg({
                url: 'upload.php',
                max: 800,
                callbackFun: function (ret, param) {
                    $("#show_img").attr("src", ret);
                }
            })
        })
    })
</script>
</body>
</html>